package model.tokens;

import java.util.Stack;

import model.semantics.Node;

/**
 * Literals are one of: integer values or variables.
 * 
 * @param <T>
 */

public abstract class LiteralToken<T> extends NodeToken<T> {
	
	public LiteralToken(String label) {
		super(label);
	}
	
	@Override
	public void process(Stack<Token<T>> operatorStack, Stack<Node<T>> output) {
		// Just push constants to the output queue.
		output.add(makeNewInstance(output));
	}

	
	@Override
	public abstract Node<T> makeNewInstance(Stack<Node<T>> nodes);
}
